import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import refresh from '@dfeidao/atom-web/url/refresh';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
export default async function a003(fd: IFeidaoAiBrowserComponent) {
	// 点击保存
	const sub = fd.data.node.querySelector<HTMLTextAreaElement>('[data-id="sub_process_des"]').value;
	if (!sub) {
		alert('请填写完整数据');
		return;
	}
	const r = await nodejs<{ code: 0 | 1; result: string }>('processing-set/zj-000005/s001', {
		filter: {
			sub_process_des: sub
		}
	});
	if (r.code === 1) {
		alert("保存成功");
		refresh();
	} else {
		alert("保存失败");
	}
}
